home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 September
/
Macworld (1998-09).dmg
/
Shareware World
/
Info
/
For Developers
/
Script Tools 1.3.6
/
Examples
/
File IO Example II
< prev
next >
Wrap
Text File
|
1993-07-08
|
383b
|
22 lines
--
-- Let the user pick a file to read
--
set newFile to choose file with prompt "Pick a file to read:" of type {"TEXT"}
--
-- Open the file and read through it
--
set refNum to open file newFile for reading
try
repeat
set input to read file refNum
display dialog input buttons {"OK"} default button "OK"
end repeat
on error
--
-- Assume EOF
--
close file refNum
end try